home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000274_fdc@watsun.cc.columbia.edu_Sat Jul 14 12:26:58 EDT 2001.msg < prev    next >
Text File  |  2020-01-01  |  4KB  |  87 lines

  1. Article: 12605 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
  3. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.os.vxworks,comp.arch.embedded,comp.protocols.kermit.misc
  5. Subject: Re: Kermit for VxWorks
  6. Date: 14 Jul 2001 16:26:45 GMT
  7. Organization: Columbia University
  8. Lines: 70
  9. Message-ID: <9iprs5$49g$1@newsmaster.cc.columbia.edu>
  10. References: <9ikjrq$asm@watsun.cc.columbia.edu> <3B506CAD.D85AC443@covad.net>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 995128005 4400 128.59.39.2 (14 Jul 2001 16:26:45 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 14 Jul 2001 16:26:45 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.os.vxworks:41704 comp.arch.embedded:108407 comp.protocols.kermit.misc:12605
  16.  
  17. In article <3B506CAD.D85AC443@covad.net>, <drdiags@covad.net> wrote:
  18. :     Some points I have noticed during the porting of gkermit. There
  19. : are several functions and structures which I probably would declare
  20. : static, such as lkup() in the gwart.c file. vxWorks has a similar
  21. : function. So I am going through all the source and leaving global
  22. : those functions that make sense for me. I may not complete this in 
  23. : a timely manner, so hopefully someone else has already moved further
  24. : along than I.
  25. Yes, at least one other person is working this.  If anybody else is
  26. working on it too, please get in touch with me so I can coordinate.
  27.  
  28. Obviously I underestimated the differences between VxWorks and other
  29. UNIXlike RTOSs like QNX and OS-9.  It appears that traditionally
  30. structured C programs like G-Kermit (and C-Kermit) are not a good fit
  31. to the VxWorks model.  G-Kermit was not designed for embedding.
  32.  
  33. Since my original posting I have learned that:
  34.  
  35.  . Software for VxWorks is cross-built on other platforms,
  36.    such as Sun.
  37.  
  38.  . One doesn't have programs in VxWorks, one has functions.
  39.    Thus there can be no main().
  40.  
  41.  . When a function is invoked from the VxWorks shell,
  42.    command-line arguments are mapped to function arguments.
  43.    Thus the handling of argc/argv must be reworked.
  44.  
  45.  . All memory is global, there is no separate address space for
  46.    different tasks (thus the need to be careful with global
  47.    variables and buffers).
  48.  
  49.  . VxWorks public functions are object files, not executables;
  50.    they are linked when loaded.
  51.  
  52. Another guy who tried building G-Kermit on VxWorks got clean compiles
  53. for all modules except gunixio.c, where the following functions had
  54. errors.  Here is what those functions should do:
  55.  
  56.  . sysinit() gets and saves the console terminal modes (if such a
  57.    concept even exists on VxWorks) and then sets the console terminal
  58.    to ignore keyboard interrupts.  If VxWorks does not support console 
  59.    terminal keyboard interrupts then sysinit() has nothing to do.
  60.  
  61.  . ttpkt() sets the console terminal modes (if necessary) to allow
  62.    Kermit to read a stream of bytes literally, without the console
  63.    driver getting in the way.  It also needs to enable some form of
  64.    flow control, if VxWorks supports such a thing, such as RTS/CTS or
  65.    Xon/Xoff.  It also instructs the OS not to echo incoming
  66.    characters.
  67.  
  68.  . ttflui() reads and discards any characters that have arrived and
  69.    are sitting in the console buffer, but have not yet been read by
  70.    Kermit.  It must not block.
  71.  
  72.  . ttinl() reads a Kermit packet with a given timeout -- that is, if
  73.    the packet does not arrive within "timo" seconds, it's supposed to
  74.    give up and return -1.  In UNIX this is done with alarm() and
  75.    signal(), which apparently don't exist in VxWorks?
  76.  
  77. Also, note that gwart.c and gproto.w can probably be ignored.  gproto.w
  78. is the Kermit protocol state table interpreter, written in a Lex-like
  79. language called "wart".  gwart.c is compiled and saved as "wart", and
  80. then gproto.w is run through wart to produce gproto.c.  But gproto.c is
  81. already included.  You don't need to mess with wart and gproto.w unless
  82. you are changing the protocol module.  In any case, the wart program is
  83. run only on the development system, not on VxWorks.
  84.  
  85. - Frank
  86.